package com.atguigu.myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author : zhenyu
 * @Date : 2022/8/30 16:33
 **/

@Configuration
public class MySelfRule {

    @Bean
    public IRule myRule(){
        //定义为随机访问
        return new RandomRule();
    }
}

